package com.project.bohang.controller;


import com.project.bohang.common.model.Response;
import com.project.bohang.common.model.page.PageResult;
import com.project.bohang.pojo.dto.UserOutRiskRecordDto;
import com.project.bohang.pojo.vo.UserOutRiskRecordVo;
import com.project.bohang.service.UserOutRiskRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *  用户外出记录 （管理员）
 *
 * @author bohang
 * @since 2022-03-26
 */
@Controller
@RequestMapping("/adminOutRiskRecord")
@ResponseBody
public class AdminOutRiskRecordController extends BaseController {

    @Autowired
    private UserOutRiskRecordService userOutRiskRecordService;

    /**
     * 用户外出记录列表(改功能只有查看，不能传userId)
     *
     * @param dto
     * @return
     */
    @PostMapping("/list")
    public Response<PageResult<UserOutRiskRecordVo>> selectList(@RequestBody UserOutRiskRecordDto dto){
        return Response.success(getDataTable(userOutRiskRecordService.userSelectList(dto)));
    }

}

